import * as actionTypes from './constants.js';



export const getSelectGoods = (data) => {
  return {
    type: actionTypes.CHANGE_SELECTGOODS,
    data,
  }
}

export const getSelectGoodsCount = (data, index) => {
  return {
    type: actionTypes.CHANGE_SELECTGOODS_COUNT,
    data,
    index,
  }
}

export const setAddCount = (index) => {
  return {
    type:actionTypes.SETADD_COUNT,
    index:index
  }
}
export const setSubCount = (index) => {
  return {
    type:actionTypes.SUBADD_COUNT,
    index:index
  }
}
export const setChangeSelect = (index) => {
  return {
    type:actionTypes.CHANGE_SELECT,
    index:index
  }
}
export const setAllSelect = () => {
  return {
    type:actionTypes.ALL_SELECT,
  }
}
export const setDeleteState = () => {
  return {
    type:actionTypes.DELETE_STATE,
  }
}
export const setDeleteGoods = () => {
  return {
    type:actionTypes.DELETE_GOODS,
  }
}